package com.iocup.keybastion.authentication.userdetails.password;

/**
 * 此类来自于spring security
 *
 * @author xyjxust
 * @create 2020/3/12 13:04
 **/
public interface PasswordEncoder {
    //加密
    String encode(CharSequence charSequence);

    //数据对比 charSequence为原始密码   var2为加密密码
    boolean matches(CharSequence resource, String target);

    static PasswordEncoder defaultBuild() {
        return new BCryptPasswordEncoder();
    }
}
